package com.liu.frame.fragment;

import android.view.View;
import android.widget.TextView;

import com.liu.frame.R;
import com.liu.frame.base.BaseFragment;
import com.liu.frame.utils.ToastUtils;

/**
 * Created by 刘智强 on 2017/2/21.
 * 首页fragment
 */

public class HomeFragment extends BaseFragment {
    private TextView tv_name;

    @Override
    protected int getContentViewLayoutID() {
        return R.layout.product_item;
    }

    @Override
    public void initView(View v) {
        tv_name = $(R.id.tv_name);

    }

    @Override
    public void objectLogic() {

    }

    @Override
    public void loadCache() {

    }

    @Override
    public void initEvents() {

    }

    @Override
    protected void onFirstUserVisible() {
        tv_name.setText("第一次可见");
        ToastUtils.myToast(mActThis,"第一次可见");

    }

    @Override
    protected void onLazyLoad() {
        super.onLazyLoad();
        tv_name.setText("可见状态");

    }
    //    @Override
//    protected void onUserVisible() {
//        tv_name.setText("可见状态");
//
//    }


    @Override
    public void OnClickEvents(View v) {
        switch (v.getId()){
            default:
        }

    }

    @Override
    public String getFragmentName() {
        return this.getClass().getName();
    }

}
